package net.ScAlAn;

import java.io.Serializable;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class EntityManagerAccessBean implements Serializable {

    private static EntityManagerFactory emf = null;

    public static synchronized EntityManager getEntityManager() {
        if (emf == null) {
            emf = Persistence.createEntityManagerFactory("cwmPU");
        }
        return emf.createEntityManager();
    }
}
